<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>上中下布局</title>
    <style>
        *{margin:0;padding:0;}
        .main{
            height:100vh;
            display: flex;
            flex-direction: column;
        }
        .top{
            height:200px;
            background:pink;
        }
        .nav{
            height:40px;
            display: flex;
            justify-content: space-around;
            align-items: center;
            background:green;
        }
        .content{
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background:yellow;
        }
        .content .content_top{
            flex:1;
            overflow: scroll;
            background: #f5f5f5;
            padding:10px 16px;
        }
        .content .content_bottom{
            height:60px;
            background:purple;
        }
        h2{height:70px;}/*主要为了撑高度*/
    </style>
</head>
<body>
<div class="main">
    <div class="top">顶部</div>
    <div class="nav"><span>导航</span><span>导航</span></div>
    <div class="content">
        <div class="content_top">
            <h2>主要内容块,需要上下滑动1</h2>
            <h2>主要内容块,需要上下滑动2</h2>
            <h2>主要内容块,需要上下滑动3</h2>
            <h2>主要内容块,需要上下滑动4</h2>
            <h2>主要内容块,需要上下滑动5</h2>
        </div>
        <div class="content_bottom">
            底部
        </div>
    </div>
</div>
</body>
</html>
